#ifndef _WORK_MODE_H_
#define _WORK_MODE_H_

typedef  unsigned char WorkModeType; 

enum WMainMode{
    WMODE_ERR_MODE	=  0X00,
    WMODE_RGB_MODE	=  0X40,
    WMODE_FLUO_MODE	=  0X50,
    WMODE_REV_MODE	=  0X60,
    WMODE_ENG_MODE	=  0X70,
    WMODE_TEST_MODE	=  0X71,
    WMODE_STBY_MODE	=  0X80,
};

enum WSumMode{
    WMODE_RGB_SUBMODE  =  0x64,
    WMODE_FLUO_SUBMODE  =  0x01,
    WMODE_FLUO_SUBMODE1 =  0x02,
    WMODE_FLUO_SUBMODE2 =  0x03,  
    WMODE_ENG_SUBMOE   =  0x71,
	WMODE_STBY_SUBMODE = 0x072,
};

struct WorkMode {
	WorkModeType previous;
	WorkModeType current;
	WorkModeType submode;
};

/*
static inline void WORKMODE_Mode_Set(struct WorkMode *wm, WorkModeType mode, WorkModeType submode)
{
	wm->previous = wm->current;
	wm->current = mode;
	wm->submode = submode;
}

static inline void WORKMODE_Rgb_Set(struct WorkMode *wm)
{
	if (wm->current == WMODE_RGB_MODE)
		return;
		
	wm->previous = wm->current;
	wm->current = WMODE_RGB_MODE;
	wm->submode = WMODE_RGB_SUBMODE;
}

static inline void WORKMODE_Fluo_Set(struct WorkMode *wm)
{
	if (wm->current == WMODE_FLUO_MODE)
		return;
		
	wm->previous = wm->current;
	wm->current = WMODE_FLUO_MODE;
	wm->submode = WMODE_FLUO_SUBMODE;
}

static inline void WORKMODE_Fluo1_Set(struct WorkMode *wm)
{
	wm->previous = wm->current;
	wm->current = WMODE_FLUO_MODE;
	wm->submode = WMODE_FLUO_SUBMODE1;
}
 */

extern struct WorkMode g_WorkMode;

#endif